﻿namespace LogManager.Gui.FrameworkExtensions
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Input;
    using System.Windows.Markup;
    using System.Windows.Media.Animation;

    /// <summary>
    /// Represents <see cref="FrameworkElement"/> or <see cref="FrameworkContentElement"/>
    /// </summary>
    public interface IFrameworkElement : IFrameworkInputElement, ISupportInitialize
    {
        // Methods

        void BeginStoryboard(Storyboard storyboard);

        void BeginStoryboard(Storyboard storyboard, HandoffBehavior handoffBehavior);

        void BeginStoryboard(Storyboard storyboard, HandoffBehavior handoffBehavior, bool isControllable);

        void BringIntoView();

        object FindName(string name);

        object FindResource(object resourceKey);

        BindingExpression GetBindingExpression(DependencyProperty dp);

        bool MoveFocus(TraversalRequest request);

        DependencyObject PredictFocus(FocusNavigationDirection direction);

        void RegisterName(string name, object scopedElement);

        BindingExpression SetBinding(DependencyProperty dp, string path);

        BindingExpressionBase SetBinding(DependencyProperty dp, BindingBase binding);

        void SetResourceReference(DependencyProperty dp, object name);

        bool ShouldSerializeResources();

        bool ShouldSerializeStyle();

        object TryFindResource(object resourceKey);

        void UnregisterName(string name);

        //Properties

        ContextMenu ContextMenu { get; set; }

        Cursor Cursor { get; set; }

        object DataContext { get; set; }

        Style FocusVisualStyle { get; set; }

        bool ForceCursor { get; set; }

        InputScope InputScope { get; set; }

        bool IsInitialized { get; }

        bool IsLoaded { get; }

        XmlLanguage Language { get; set; }

        bool OverridesDefaultStyle { get; set; }

        DependencyObject Parent { get; }

        ResourceDictionary Resources { get; set; }

        Style Style { get; set; }

        object Tag { get; set; }

        DependencyObject TemplatedParent { get; }

        object ToolTip { get; set; }

        //Events

        event ContextMenuEventHandler ContextMenuClosing;

        event ContextMenuEventHandler ContextMenuOpening;

        event DependencyPropertyChangedEventHandler DataContextChanged;

        event EventHandler Initialized;

        event RoutedEventHandler Loaded;

        event EventHandler<DataTransferEventArgs> SourceUpdated;

        event EventHandler<DataTransferEventArgs> TargetUpdated;

        event ToolTipEventHandler ToolTipClosing;

        event ToolTipEventHandler ToolTipOpening;

        event RoutedEventHandler Unloaded;
    }
}

